package com.scgl.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scgl.order.mapper.ScglOrderMapper;
import com.scgl.order.domain.ScglOrder;
import com.scgl.order.service.IScglOrderService;

/**
 * 生产订单Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-25
 */
@Service
public class ScglOrderServiceImpl implements IScglOrderService
{
    @Autowired
    private ScglOrderMapper scglOrderMapper;

    /**
     * 查询生产订单
     *
     * @param orderId 生产订单主键
     * @return 生产订单
     */
    @Override
    public ScglOrder selectScglOrderByOrderId(Long orderId)
    {
        return scglOrderMapper.selectScglOrderByOrderId(orderId);
    }

    /**
     * 查询生产订单列表
     *
     * @param scglOrder 生产订单
     * @return 生产订单
     */
    @Override
    public List<ScglOrder> selectScglOrderList(ScglOrder scglOrder)
    {
        return scglOrderMapper.selectScglOrderList(scglOrder);
    }

    /**
     * 新增生产订单
     *
     * @param scglOrder 生产订单
     * @return 结果
     */
    @Override
    public int insertScglOrder(ScglOrder scglOrder)
    {
        return scglOrderMapper.insertScglOrder(scglOrder);
    }

    /**
     * 修改生产订单
     *
     * @param scglOrder 生产订单
     * @return 结果
     */
    @Override
    public int updateScglOrder(ScglOrder scglOrder)
    {
        return scglOrderMapper.updateScglOrder(scglOrder);
    }

    /**
     * 批量删除生产订单
     *
     * @param orderIds 需要删除的生产订单主键
     * @return 结果
     */
    @Override
    public int deleteScglOrderByOrderIds(Long[] orderIds)
    {
        return scglOrderMapper.deleteScglOrderByOrderIds(orderIds);
    }

    /**
     * 删除生产订单信息
     *
     * @param orderId 生产订单主键
     * @return 结果
     */
    @Override
    public int deleteScglOrderByOrderId(Long orderId)
    {
        return scglOrderMapper.deleteScglOrderByOrderId(orderId);
    }

    @Override
    public int cancelScglOrder(ScglOrder scglOrder) {

        return scglOrderMapper.cancelScglOrder(scglOrder);
    }
}
